/* Root element */
.json-document {
  padding: 1em 2em;

  li:hover {
    .json-dict, .json-array {
      border-left-color: #5e5e5e;
    }

    > a.json-toggle:before {
      color: #888888;
    }
  }
}

/* Syntax highlighting for JSON objects */
ul.json-dict, ol.json-array {
  list-style-type: none;
  margin: 0 0 0 1px;
  border-left: 1px dotted #ccc;
  padding-left: 2em;
}

.json-string {
  color: #0B7500;
}

.json-literal {
  color: #006fff;
}

/* Toggle button */
a.json-toggle {
  position: relative;
  color: inherit;
  text-decoration: none;

  &:focus {
    outline: none;
  }

  &:before {
    font-size: 1em;
    color: #ccc;
    content: "\25BC"; /* down arrow */
    position: absolute;
    display: inline-block;
    width: 1em;
    text-align: center;
    line-height: 1em;
    left: -1.2em;
    margin-top: 3px;
    transform: scale(0.8);
  }

  &.collapsed:before {
    /* Use rotated down arrow, prevents right arrow appearing smaller than down arrow in some browsers */
    transform: scale(0.8) rotate(-90deg);
  }
}

/* Collapsable placeholder links */
a.json-placeholder {
  color: #888888;
  padding: 0 1em;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

/* ------------------dark-mode--------------------- */
.theme-dark {
  .json-string {
    color: #229d15;
  }

  .json-literal {
    color: #0098ff;
  }

  ul.json-dict,
  ol.json-array {
    border-left-color: #666666;
  }

  .json-document li:hover {
    .json-dict,
    .json-array {
      border-left-color: #aaaaaa;
    }

    > a.json-toggle:before {
      color: #aaaaaa;
    }
  }

  a.json-toggle:before {
    color: #666666;
  }
}
